home *** CD-ROM | disk | FTP | other *** search
Text File | 1998-08-17 | 24.8 KB | 844 lines | [TEXT/MPS ] |
- ;
- ; File: Drag.a
- ;
- ; Contains: Drag and Drop Interfaces.
- ;
- ; Version: Technology: System 7.5
- ; Release: Universal Interfaces 3.2
- ;
- ; Copyright: © 1992-1998 by Apple Computer, Inc., all rights reserved.
- ;
- ; Bugs?: For bug reports, consult the following page on
- ; the World Wide Web:
- ;
- ; http://developer.apple.com/bugreporter/
- ;
- ;
- IF &TYPE('__DRAG__') = 'UNDEFINED' THEN
- __DRAG__ SET 1
-
- IF &TYPE('__MACTYPES__') = 'UNDEFINED' THEN
- include 'MacTypes.a'
- ENDIF
- IF &TYPE('__EVENTS__') = 'UNDEFINED' THEN
- include 'Events.a'
- ENDIF
- IF &TYPE('__FILES__') = 'UNDEFINED' THEN
- include 'Files.a'
- ENDIF
- IF &TYPE('__APPLEEVENTS__') = 'UNDEFINED' THEN
- include 'AppleEvents.a'
- ENDIF
- IF &TYPE('__QUICKDRAW__') = 'UNDEFINED' THEN
- include 'Quickdraw.a'
- ENDIF
-
-
- ; _________________________________________________________________________________________________________
- ;
- ; • DRAG MANAGER DATA TYPES
- ; _________________________________________________________________________________________________________
-
-
-
-
-
- ; typedef UInt32 ItemReference
-
- ; typedef OSType FlavorType
-
-
- ; _________________________________________________________________________________________________________
- ;
- ; • DRAG ATTRIBUTES
- ; _________________________________________________________________________________________________________
-
-
-
- ; typedef OptionBits DragAttributes
-
-
- kDragHasLeftSenderWindow EQU $00000001 ; drag has left the source window since TrackDrag
- kDragInsideSenderApplication EQU $00000002 ; drag is occurring within the sender application
- kDragInsideSenderWindow EQU $00000004 ; drag is occurring within the sender window
-
- ; _________________________________________________________________________________________________________
- ;
- ; • DRAG IMAGE FLAGS
- ; _________________________________________________________________________________________________________
-
-
-
- ; typedef OptionBits DragImageFlags
-
-
- kDragRegionAndImage EQU $00000010 ; drag region and image
-
- ; _________________________________________________________________________________________________________
- ;
- ; • DRAG IMAGE TRANSLUCENCY LEVELS
- ; _________________________________________________________________________________________________________
-
-
-
-
- kDragStandardTranslucency EQU 0 ; 65% image translucency (standard)
- kDragDarkTranslucency EQU 1 ; 50% image translucency
- kDragDarkerTranslucency EQU 2 ; 25% image translucency
- kDragOpaqueTranslucency EQU 3 ; 0% image translucency (opaque)
-
- ; _________________________________________________________________________________________________________
- ;
- ; • DRAG DRAWING PROCEDURE MESSAGES
- ; _________________________________________________________________________________________________________
-
-
-
- ; typedef SInt16 DragRegionMessage
-
-
- kDragRegionBegin EQU 1 ; initialize drawing
- kDragRegionDraw EQU 2 ; draw drag feedback
- kDragRegionHide EQU 3 ; hide drag feedback
- kDragRegionIdle EQU 4 ; drag feedback idle time
- kDragRegionEnd EQU 5 ; end of drawing
-
- ; _________________________________________________________________________________________________________
- ;
- ; • ZOOM ACCELERATION
- ; _________________________________________________________________________________________________________
-
-
-
- ; typedef SInt16 ZoomAcceleration
-
-
- kZoomNoAcceleration EQU 0 ; use linear interpolation
- kZoomAccelerate EQU 1 ; ramp up step size
- kZoomDecelerate EQU 2 ; ramp down step size
-
- ; _________________________________________________________________________________________________________
- ;
- ; • FLAVOR FLAGS
- ; _________________________________________________________________________________________________________
-
-
-
- ; typedef OptionBits FlavorFlags
-
-
- flavorSenderOnly EQU $01 ; flavor is available to sender only
- flavorSenderTranslated EQU $02 ; flavor is translated by sender
- flavorNotSaved EQU $04 ; flavor should not be saved
- flavorSystemTranslated EQU $0100 ; flavor is translated by system
-
- ; _________________________________________________________________________________________________________
- ;
- ; • SPECIAL FLAVORS
- ; _________________________________________________________________________________________________________
-
-
-
-
- flavorTypeHFS EQU 'hfs ' ; flavor type for HFS data
- flavorTypePromiseHFS EQU 'phfs' ; flavor type for promised HFS data
- flavorTypeDirectory EQU 'diry' ; flavor type for AOCE directories
-
- ; _________________________________________________________________________________________________________
- ;
- ; • FLAVORS FOR FINDER 8.0 AND LATER
- ; _________________________________________________________________________________________________________
-
-
-
-
- kFlavorTypeClippingName EQU 'clnm' ; name hint for clipping file (preferred over 'clfn')
- kFlavorTypeClippingFilename EQU 'clfn' ; name for clipping file
- kFlavorTypeDragToTrashOnly EQU 'fdtt' ; for apps that want to allow dragging private data to the trash
- kFlavorTypeFinderNoTrackingBehavior EQU 'fntb' ; Finder completely ignores any drag containing this flavor
-
- ; _________________________________________________________________________________________________________
- ;
- ; • DRAG TRACKING HANDLER MESSAGES
- ; _________________________________________________________________________________________________________
-
-
-
- ; typedef SInt16 DragTrackingMessage
-
-
- kDragTrackingEnterHandler EQU 1 ; drag has entered handler
- kDragTrackingEnterWindow EQU 2 ; drag has entered window
- kDragTrackingInWindow EQU 3 ; drag is moving within window
- kDragTrackingLeaveWindow EQU 4 ; drag has exited window
- kDragTrackingLeaveHandler EQU 5 ; drag has exited handler
-
- ; _________________________________________________________________________________________________________
- ;
- ; • HFS FLAVORS
- ; _________________________________________________________________________________________________________
-
-
-
- HFSFlavor RECORD 0
- fileType ds.l 1 ; offset: $0 (0) ; file type
- fileCreator ds.l 1 ; offset: $4 (4) ; file creator
- fdFlags ds.w 1 ; offset: $8 (8) ; Finder flags
- fileSpec ds FSSpec ; offset: $A (10) ; file system specification
- sizeof EQU * ; size: $50 (80)
- ENDR
- PromiseHFSFlavor RECORD 0
- fileType ds.l 1 ; offset: $0 (0) ; file type
- fileCreator ds.l 1 ; offset: $4 (4) ; file creator
- fdFlags ds.w 1 ; offset: $8 (8) ; Finder flags
- promisedFlavor ds.l 1 ; offset: $A (10) ; promised flavor containing an FSSpec
- sizeof EQU * ; size: $E (14)
- ENDR
-
- ; _________________________________________________________________________________________________________
- ;
- ; • APPLICATION-DEFINED DRAG HANDLER ROUTINES
- ; _________________________________________________________________________________________________________
-
-
-
- ; _________________________________________________________________________________________________________
- ;
- ; • APPLICATION-DEFINED ROUTINES
- ; _________________________________________________________________________________________________________
-
-
-
- ; _________________________________________________________________________________________________________
- ;
- ; • INSTALLING AND REMOVING HANDLERS API'S
- ; _________________________________________________________________________________________________________
-
-
-
- ;
- ; pascal OSErr InstallTrackingHandler(DragTrackingHandlerUPP trackingHandler, WindowPtr theWindow, void *handlerRefCon)
- ;
- IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
- Macro
- _InstallTrackingHandler
- moveq #1,D0
- dc.w $ABED
- EndM
- ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
- IMPORT_CFM_FUNCTION InstallTrackingHandler
- ENDIF
-
- ;
- ; pascal OSErr InstallReceiveHandler(DragReceiveHandlerUPP receiveHandler, WindowPtr theWindow, void *handlerRefCon)
- ;
- IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
- Macro
- _InstallReceiveHandler
- moveq #2,D0
- dc.w $ABED
- EndM
- ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
- IMPORT_CFM_FUNCTION InstallReceiveHandler
- ENDIF
-
- ;
- ; pascal OSErr RemoveTrackingHandler(DragTrackingHandlerUPP trackingHandler, WindowPtr theWindow)
- ;
- IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
- Macro
- _RemoveTrackingHandler
- moveq #3,D0
- dc.w $ABED
- EndM
- ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
- IMPORT_CFM_FUNCTION RemoveTrackingHandler
- ENDIF
-
- ;
- ; pascal OSErr RemoveReceiveHandler(DragReceiveHandlerUPP receiveHandler, WindowPtr theWindow)
- ;
- IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
- Macro
- _RemoveReceiveHandler
- moveq #4,D0
- dc.w $ABED
- EndM
- ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
- IMPORT_CFM_FUNCTION RemoveReceiveHandler
- ENDIF
-
-
- ; _________________________________________________________________________________________________________
- ;
- ; • CREATING & DISPOSING
- ; _________________________________________________________________________________________________________
-
-
-
- ;
- ; pascal OSErr NewDrag(DragReference *theDrag)
- ;
- IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
- Macro
- _NewDrag
- moveq #5,D0
- dc.w $ABED
- EndM
- ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
- IMPORT_CFM_FUNCTION NewDrag
- ENDIF
-
- ;
- ; pascal OSErr DisposeDrag(DragReference theDrag)
- ;
- IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
- Macro
- _DisposeDrag
- moveq #6,D0
- dc.w $ABED
- EndM
- ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
- IMPORT_CFM_FUNCTION DisposeDrag
- ENDIF
-
-
- ; _________________________________________________________________________________________________________
- ;
- ; • ADDING DRAG ITEM FLAVORS
- ; _________________________________________________________________________________________________________
-
-
-
- ;
- ; pascal OSErr AddDragItemFlavor(DragReference theDrag, ItemReference theItemRef, FlavorType theType, const void *dataPtr, Size dataSize, FlavorFlags theFlags)
- ;
- IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
- Macro
- _AddDragItemFlavor
- moveq #7,D0
- dc.w $ABED
- EndM
- ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
- IMPORT_CFM_FUNCTION AddDragItemFlavor
- ENDIF
-
- ;
- ; pascal OSErr SetDragItemFlavorData(DragReference theDrag, ItemReference theItemRef, FlavorType theType, const void *dataPtr, Size dataSize, UInt32 dataOffset)
- ;
- IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
- Macro
- _SetDragItemFlavorData
- moveq #9,D0
- dc.w $ABED
- EndM
- ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
- IMPORT_CFM_FUNCTION SetDragItemFlavorData
- ENDIF
-
-
- ; _________________________________________________________________________________________________________
- ;
- ; • PROVIDING CALLBACK PROCEDURES
- ; _________________________________________________________________________________________________________
-
-
-
- ;
- ; pascal OSErr SetDragSendProc(DragReference theDrag, DragSendDataUPP sendProc, void *dragSendRefCon)
- ;
- IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
- Macro
- _SetDragSendProc
- moveq #10,D0
- dc.w $ABED
- EndM
- ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
- IMPORT_CFM_FUNCTION SetDragSendProc
- ENDIF
-
-
- ;
- ; pascal OSErr SetDragInputProc(DragReference theDrag, DragInputUPP inputProc, void *dragInputRefCon)
- ;
- IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
- Macro
- _SetDragInputProc
- moveq #11,D0
- dc.w $ABED
- EndM
- ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
- IMPORT_CFM_FUNCTION SetDragInputProc
- ENDIF
-
- ;
- ; pascal OSErr SetDragDrawingProc(DragReference theDrag, DragDrawingUPP drawingProc, void *dragDrawingRefCon)
- ;
- IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
- Macro
- _SetDragDrawingProc
- moveq #12,D0
- dc.w $ABED
- EndM
- ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
- IMPORT_CFM_FUNCTION SetDragDrawingProc
- ENDIF
-
-
- ; _________________________________________________________________________________________________________
- ;
- ; • SETTING THE DRAG IMAGE
- ; _________________________________________________________________________________________________________
-
-
-
- ;
- ; pascal OSErr SetDragImage(DragReference theDrag, PixMapHandle imagePixMap, RgnHandle imageRgn, Point imageOffsetPt, DragImageFlags theImageFlags)
- ;
- IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
- Macro
- _SetDragImage
- moveq #39,D0
- dc.w $ABED
- EndM
- ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
- IMPORT_CFM_FUNCTION SetDragImage
- ENDIF
-
-
- ; _________________________________________________________________________________________________________
- ;
- ; • PERFORMING A DRAG
- ; _________________________________________________________________________________________________________
-
-
-
- ;
- ; pascal OSErr TrackDrag(DragReference theDrag, const EventRecord *theEvent, RgnHandle theRegion)
- ;
- IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
- Macro
- _TrackDrag
- moveq #13,D0
- dc.w $ABED
- EndM
- ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
- IMPORT_CFM_FUNCTION TrackDrag
- ENDIF
-
-
- ; _________________________________________________________________________________________________________
- ;
- ; • GETTING DRAG ITEM INFORMATION
- ; _________________________________________________________________________________________________________
-
-
-
- ;
- ; pascal OSErr CountDragItems(DragReference theDrag, UInt16 *numItems)
- ;
- IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
- Macro
- _CountDragItems
- moveq #14,D0
- dc.w $ABED
- EndM
- ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
- IMPORT_CFM_FUNCTION CountDragItems
- ENDIF
-
- ;
- ; pascal OSErr GetDragItemReferenceNumber(DragReference theDrag, UInt16 index, ItemReference *theItemRef)
- ;
- IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
- Macro
- _GetDragItemReferenceNumber
- moveq #15,D0
- dc.w $ABED
- EndM
- ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
- IMPORT_CFM_FUNCTION GetDragItemReferenceNumber
- ENDIF
-
- ;
- ; pascal OSErr CountDragItemFlavors(DragReference theDrag, ItemReference theItemRef, UInt16 *numFlavors)
- ;
- IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
- Macro
- _CountDragItemFlavors
- moveq #16,D0
- dc.w $ABED
- EndM
- ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
- IMPORT_CFM_FUNCTION CountDragItemFlavors
- ENDIF
-
- ;
- ; pascal OSErr GetFlavorType(DragReference theDrag, ItemReference theItemRef, UInt16 index, FlavorType *theType)
- ;
- IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
- Macro
- _GetFlavorType
- moveq #17,D0
- dc.w $ABED
- EndM
- ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
- IMPORT_CFM_FUNCTION GetFlavorType
- ENDIF
-
- ;
- ; pascal OSErr GetFlavorFlags(DragReference theDrag, ItemReference theItemRef, FlavorType theType, FlavorFlags *theFlags)
- ;
- IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
- Macro
- _GetFlavorFlags
- moveq #18,D0
- dc.w $ABED
- EndM
- ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
- IMPORT_CFM_FUNCTION GetFlavorFlags
- ENDIF
-
- ;
- ; pascal OSErr GetFlavorDataSize(DragReference theDrag, ItemReference theItemRef, FlavorType theType, Size *dataSize)
- ;
- IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
- Macro
- _GetFlavorDataSize
- moveq #19,D0
- dc.w $ABED
- EndM
- ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
- IMPORT_CFM_FUNCTION GetFlavorDataSize
- ENDIF
-
- ;
- ; pascal OSErr GetFlavorData(DragReference theDrag, ItemReference theItemRef, FlavorType theType, void *dataPtr, Size *dataSize, UInt32 dataOffset)
- ;
- IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
- Macro
- _GetFlavorData
- moveq #20,D0
- dc.w $ABED
- EndM
- ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
- IMPORT_CFM_FUNCTION GetFlavorData
- ENDIF
-
-
- ; _________________________________________________________________________________________________________
- ;
- ; • DRAG ITEM BOUNDS
- ; _________________________________________________________________________________________________________
-
-
-
- ;
- ; pascal OSErr GetDragItemBounds(DragReference theDrag, ItemReference theItemRef, Rect *itemBounds)
- ;
- IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
- Macro
- _GetDragItemBounds
- moveq #21,D0
- dc.w $ABED
- EndM
- ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
- IMPORT_CFM_FUNCTION GetDragItemBounds
- ENDIF
-
- ;
- ; pascal OSErr SetDragItemBounds(DragReference theDrag, ItemReference theItemRef, const Rect *itemBounds)
- ;
- IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
- Macro
- _SetDragItemBounds
- moveq #22,D0
- dc.w $ABED
- EndM
- ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
- IMPORT_CFM_FUNCTION SetDragItemBounds
- ENDIF
-
-
- ; _________________________________________________________________________________________________________
- ;
- ; • DROP LOCATIONS
- ; _________________________________________________________________________________________________________
-
-
-
- ;
- ; pascal OSErr GetDropLocation(DragReference theDrag, AEDesc *dropLocation)
- ;
- IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
- Macro
- _GetDropLocation
- moveq #23,D0
- dc.w $ABED
- EndM
- ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
- IMPORT_CFM_FUNCTION GetDropLocation
- ENDIF
-
- ;
- ; pascal OSErr SetDropLocation(DragReference theDrag, const AEDesc *dropLocation)
- ;
- IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
- Macro
- _SetDropLocation
- moveq #24,D0
- dc.w $ABED
- EndM
- ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
- IMPORT_CFM_FUNCTION SetDropLocation
- ENDIF
-
-
- ; _________________________________________________________________________________________________________
- ;
- ; • GETTING INFORMATION ABOUT A DRAG
- ; _________________________________________________________________________________________________________
-
-
-
- ;
- ; pascal OSErr GetDragAttributes(DragReference theDrag, DragAttributes *flags)
- ;
- IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
- Macro
- _GetDragAttributes
- moveq #25,D0
- dc.w $ABED
- EndM
- ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
- IMPORT_CFM_FUNCTION GetDragAttributes
- ENDIF
-
- ;
- ; pascal OSErr GetDragMouse(DragReference theDrag, Point *mouse, Point *globalPinnedMouse)
- ;
- IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
- Macro
- _GetDragMouse
- moveq #26,D0
- dc.w $ABED
- EndM
- ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
- IMPORT_CFM_FUNCTION GetDragMouse
- ENDIF
-
- ;
- ; pascal OSErr SetDragMouse(DragReference theDrag, Point globalPinnedMouse)
- ;
- IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
- Macro
- _SetDragMouse
- moveq #27,D0
- dc.w $ABED
- EndM
- ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
- IMPORT_CFM_FUNCTION SetDragMouse
- ENDIF
-
- ;
- ; pascal OSErr GetDragOrigin(DragReference theDrag, Point *globalInitialMouse)
- ;
- IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
- Macro
- _GetDragOrigin
- moveq #28,D0
- dc.w $ABED
- EndM
- ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
- IMPORT_CFM_FUNCTION GetDragOrigin
- ENDIF
-
- ;
- ; pascal OSErr GetDragModifiers(DragReference theDrag, SInt16 *modifiers, SInt16 *mouseDownModifiers, SInt16 *mouseUpModifiers)
- ;
- IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
- Macro
- _GetDragModifiers
- moveq #29,D0
- dc.w $ABED
- EndM
- ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
- IMPORT_CFM_FUNCTION GetDragModifiers
- ENDIF
-
-
- ; _________________________________________________________________________________________________________
- ;
- ; • DRAG HIGHLIGHTING
- ; _________________________________________________________________________________________________________
-
-
-
- ;
- ; pascal OSErr ShowDragHilite(DragReference theDrag, RgnHandle hiliteFrame, Boolean inside)
- ;
- IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
- Macro
- _ShowDragHilite
- moveq #30,D0
- dc.w $ABED
- EndM
- ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
- IMPORT_CFM_FUNCTION ShowDragHilite
- ENDIF
-
- ;
- ; pascal OSErr HideDragHilite(DragReference theDrag)
- ;
- IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
- Macro
- _HideDragHilite
- moveq #31,D0
- dc.w $ABED
- EndM
- ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
- IMPORT_CFM_FUNCTION HideDragHilite
- ENDIF
-
- ;
- ; pascal OSErr DragPreScroll(DragReference theDrag, SInt16 dH, SInt16 dV)
- ;
- IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
- Macro
- _DragPreScroll
- moveq #32,D0
- dc.w $ABED
- EndM
- ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
- IMPORT_CFM_FUNCTION DragPreScroll
- ENDIF
-
- ;
- ; pascal OSErr DragPostScroll(DragReference theDrag)
- ;
- IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
- Macro
- _DragPostScroll
- moveq #33,D0
- dc.w $ABED
- EndM
- ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
- IMPORT_CFM_FUNCTION DragPostScroll
- ENDIF
-
- ;
- ; pascal OSErr UpdateDragHilite(DragReference theDrag, RgnHandle updateRgn)
- ;
- IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
- Macro
- _UpdateDragHilite
- moveq #34,D0
- dc.w $ABED
- EndM
- ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
- IMPORT_CFM_FUNCTION UpdateDragHilite
- ENDIF
-
- ;
- ; pascal OSErr GetDragHiliteColor(WindowPtr window, RGBColor *color)
- ;
- IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
- Macro
- _GetDragHiliteColor
- moveq #38,D0
- dc.w $ABED
- EndM
- ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
- IMPORT_CFM_FUNCTION GetDragHiliteColor
- ENDIF
-
-
-
- ; _________________________________________________________________________________________________________
- ;
- ; • UTILITIES
- ; _________________________________________________________________________________________________________
-
-
-
-
- ;
- ; pascal Boolean WaitMouseMoved(Point initialMouse)
- ;
- IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
- Macro
- _WaitMouseMoved
- moveq #35,D0
- dc.w $ABED
- EndM
- ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
- IMPORT_CFM_FUNCTION WaitMouseMoved
- ENDIF
-
-
- ;
- ; pascal OSErr ZoomRects(const Rect *fromRect, const Rect *toRect, SInt16 zoomSteps, ZoomAcceleration acceleration)
- ;
- IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
- Macro
- _ZoomRects
- moveq #36,D0
- dc.w $ABED
- EndM
- ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
- IMPORT_CFM_FUNCTION ZoomRects
- ENDIF
-
- ;
- ; pascal OSErr ZoomRegion(RgnHandle region, Point zoomDistance, SInt16 zoomSteps, ZoomAcceleration acceleration)
- ;
- IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
- Macro
- _ZoomRegion
- moveq #37,D0
- dc.w $ABED
- EndM
- ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
- IMPORT_CFM_FUNCTION ZoomRegion
- ENDIF
-
-
-
- ; _________________________________________________________________________________________________________
- ; • OLD NAMES
- ; These are provided for compatiblity with older source bases. It is recommended to not use them since
- ; they may removed from this interface file at any time.
- ; _________________________________________________________________________________________________________
-
-
-
- IF OLDROUTINENAMES THEN
-
- dragHasLeftSenderWindow EQU $00000001 ; drag has left the source window since TrackDrag
- dragInsideSenderApplication EQU $00000002 ; drag is occurring within the sender application
- dragInsideSenderWindow EQU $00000004 ; drag is occurring within the sender window
-
- dragTrackingEnterHandler EQU 1 ; drag has entered handler
- dragTrackingEnterWindow EQU 2 ; drag has entered window
- dragTrackingInWindow EQU 3 ; drag is moving within window
- dragTrackingLeaveWindow EQU 4 ; drag has exited window
- dragTrackingLeaveHandler EQU 5 ; drag has exited handler
-
- dragRegionBegin EQU 1 ; initialize drawing
- dragRegionDraw EQU 2 ; draw drag feedback
- dragRegionHide EQU 3 ; hide drag feedback
- dragRegionIdle EQU 4 ; drag feedback idle time
- dragRegionEnd EQU 5 ; end of drawing
-
- zoomNoAcceleration EQU 0 ; use linear interpolation
- zoomAccelerate EQU 1 ; ramp up step size
- zoomDecelerate EQU 2 ; ramp down step size
-
- kDragStandardImage EQU 0 ; 65% image translucency (standard)
- kDragDarkImage EQU 1 ; 50% image translucency
- kDragDarkerImage EQU 2 ; 25% image translucency
- kDragOpaqueImage EQU 3 ; 0% image translucency (opaque)
- ENDIF ; OLDROUTINENAMES
- ENDIF ; __DRAG__
-
-